#ifndef ACTION_H_INCLUDED
#define ACTION_H_INCLUDED

#include "magic.h"
#include "enums.h"

class Entity;



class BattleAction
{
public:
    BattleAction();
    ActionType GetPlayerAction(Entity *pPlayer);
    ActionType GetEnemyAction(Entity *pEnemy);

    bool ExecuteAction(ActionType action, Entity *pSubject, Entity *pObject);
    bool Attack(Entity *pAttacker, Entity *pTarget);
    bool Defend(Entity *pDefender);
    void setActionType(ActionType type);
    ActionType getActionType();
    string GetActionName();
    string GetActionResultString();
    Entity *targetEntity;
    float damage;

private:
    bool Hit(Entity *pAttacker, Entity *pTarget);
    int Damage(Entity *pAttacker, Entity *pTarget);
    ActionType thisActionType;
    magic lastMagic;
    string intToString(int n);



};

#endif // ACTION_H_INCLUDED
